<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 鬼国二少 <guiguoershao@163.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Home\Controller;
use OT\DataDictionary;

/**
 * 前台首页控制器
 * 主要获取首页聚合数据
 */
class IndexController extends HomeController {

	/*//系统首页
    public function index(){

        $category = D('Category')->getTree();
        $lists    = D('Document')->lists(null);

        $this->assign('category',$category);//栏目
        $this->assign('lists',$lists);//列表
        $this->assign('page',D('Document')->page);//分页

                 
        $this->display();
    }*/

    /**
     * 网站首页
     */
	public function index()
    {
        //  您要了解的课程
        $curriculaCateList = D('Category')->getListByPid(5, 3);
        $this->assign('curriculaCateList', $curriculaCateList);

        //  师资力量
        $teacherList = D('Document')->getListByPosition([24,25,26], 4, 4);
        $this->assign('teacherList', $teacherList);

        //  学校活动
        $activityList = D('Document')->getListByPosition(8, 4, 3);
        $this->assign('activityList', $activityList);

        //  设置seo
        $this->assign('seo', $this->seo);

        $this->assign('bannerList', D('Advertise')->getAdvertiseListByOnlySign('IndexBanner'));

        $this->display();
    }

}